// 统一请求路径前缀在libs/axios.js中修改
import {getRequest, postRequest, putRequest, deleteRequest, uploadFileRequest} from '@/libs/axios';


// 课程分类-tree数据
export const selectCourseType = (params) => {
    return postRequest('/base/coursetype/selectTreeData', params);
}
// 课程分类-添加
export const addCrouseType = (params) => {
    return postRequest('/base/coursetype/add', params)
}

// 课程分类-修改
export const editCrouseType = (params) => {
    return postRequest('/base/coursetype/edit', params)
}
// 课程分类-删除
export const delCrouseType = (courseTypeId) => {
    return postRequest(`/base/coursetype/delById/${courseTypeId}`)
}

// 课程-列表
export const crouseList = (params) => {
    return postRequest('/base/course/list', params)
}
// 课程-添加
export const addCrouse = (params) => {
    return postRequest('/base/course/add', params)
}
// 课程-获取
export const getCourse = (courseId, params) => {
    return getRequest(`/base/course/get/${courseId}`, params)
}
// 课程-修改
export const editCourse = (params) => {
    return postRequest('/base/course/edit', params)
}
// 课程-删除
export const delCrouse = (ids) => {
    return postRequest('/base/course/delByIds', {
        ids: ids
    })
}
// 课程-更新推荐状态
export const setRecommend = (params) => {
    return postRequest('/base/course/setRecommend', params)
}
// 课程-更新上架状态
export const setCourseStatus = (params) => {
    return postRequest('/base/course/setCourseStatus', params)
}

//继续教育
//添加课程
export const addContinueCourse = (params) => {
    return postRequest('/base/course/addContinueCourse', params)
}
// 课程-列表
export const courseContinueList = (params) => {
    return postRequest('/base/course/courseContinueList', params)
}
// 课程-列表
export const courseAuditionList = (params) => {
    return postRequest('/base/course/courseAuditionList', params)
}

// 继续教育明细
export const continueList = (params) => {
    return postRequest('/base/SysUserstudy/list', params)
}

//试听课程
export const addAuditionCourse = (params) => {
    return postRequest('/base/course/addAuditionCourse', params)
}

//课程所属模块
export const selectIndexTag = (params) => {
    return postRequest('/base/course/selectIndexTag', params)
}

//课程分类
export const getCourseType = (params) => {
    return postRequest('/base/coursetype/getCourseType', params)
}


//修改课程模块
export const setIndexTagId = (params) => {
    return postRequest('/base/course/setIndexTagId', params)
}


/*课程目录接口--benin*/

// tree数据
export const selectCataLog = (params) => {
    return postRequest('/base/catalog/selectTreeData', params)
}
//添加
export const addCataLog = (params) => {
    return postRequest('/base/catalog/add', params)
}
//修改
export const editCataLog = (params) => {
    return postRequest('/base/catalog/edit', params)
}
// 删除
export const delCataLog = (cataLogId) => {
    return postRequest(`/base/catalog/delById/${cataLogId}`)
}

// 课程目录-列表
export const cataLogList = (params) => {
    return postRequest('/base/catalog/list', params)
}
// 更新编号
export const updateCataLogNo = (params) => {
    return postRequest('/base/catalog/updateCataLogNo', params)
}

// tree数据
export const selectFirstTreeData = (params) => {
    return postRequest('/base/catalog/selectFirstTreeData', params)
}

// tree数据
export const updateCataLogSortOrder = (params) => {
    return postRequest('/base/catalog/updateCataLogSortOrder', params)
}
// tree数据
export const updateSortOrder = (params) => {
    return postRequest('/base/catalog/updateSortOrder', params)
}

/*课程目录接口--end*/


/*直播模块接口--benin*/

//列表
export const liveList = (params) => {
    return postRequest('/base/live/list', params)
}
//添加
export const addLive = (params) => {
    return postRequest('/base/live/add', params)
}
//根据ID查询
export const getLive = (id, params) => {
    return getRequest(`/base/live/get/${id}`, params)
}
//修改
export const editLive = (params) => {
    return postRequest('/base/live/edit', params)
}
//删除
export const delLive = (ids) => {
    return postRequest('/base/live/delByIds', {
        ids: ids
    })
}
//更新上架状态
export const setLiveStatus = (params) => {
    return postRequest('/base/live/setLiveStatus', params)
}
//更新是否vip免费
export const setVipFree = (params) => {
    return postRequest('/base/live/setVipFree', params)
}
/*直播模块接口--end*/

//平台证书列表
export const certificateList = (params) => {
    return postRequest('/base/certificate/list', params)
}
//编辑平台证书
export const certificateEdit = (params) => {
    return postRequest('/base/certificate/edit', params)
}
//根据证书ID查询继续教育
export const getStudyData = (id, params) => {
    return getRequest(`/base/SysStudyconfig/get/${id}`, params)
}
//根据证书id生成兑换课程及学分
export const resetTransfercourse = (certificateId) => {
    return getRequest(`/base/transfercourse/resetTransfercourse/${certificateId}`)
}
//查询兑换国开课程列表
export const selectTransfercourse = (params) => {
    return postRequest(`/base/transfercourse/list`, params)
}
//根据id删除可兑换国开课程
export const delTransfercourse = (id) => {
    return getRequest(`/base/transfercourse/delById/${id}`)
}
//添加可兑换国开课程
export const addTransfercourse = (params) => {
    return postRequest('/base/transfercourse/addTransfercourse', params)
}
//查询继续教育课程列表
export const selectContinueCourse = (params) => {
    return postRequest(`/base/continuecourse/list`, params)
}
//根据证书id生成继续教育课程
export const resetContinueCourse = (certificateId) => {
    return getRequest(`/base/continuecourse/resetContinueCourse/${certificateId}`)
}
//根据id删除继续教育课程
export const delContinueCourse = (id) => {
    return getRequest(`/base/continuecourse/delById/${id}`)
}
//添加继续教育课程
export const addNewContinueCourse = (params) => {
    return postRequest('/base/continuecourse/addContinueCourse', params)
}



//查询证书的课程
export const selectCourse = (params) => {
    return postRequest('/base/certificate/selectCourse', params)
}
//考试安排列表
export const examinationList = (params) => {
    return postRequest('/base/examination/list', params)
}
//编辑考试安排
export const examinationEdit = (params) => {
    return postRequest('/base/examination/examinationEdit', params)
}
//更新考试状态
export const setOpenStatus = (params) => {
    return postRequest('/base/examination/setOpenStatus', params)
}
//查询考试类型
export const getExamType = (params) => {
    return postRequest('/base/sysExamType/selectTypeList', params)
}
//查询考试详情
export const getData = (id, params) => {
    return getRequest(`/base/examination/get/${id}`, params)
}

//查询考试安排列表
export const selectSessionsList = (params) => {
    return postRequest(`/base/examseason/list`, params)
}
//查询考试安排详情
export const selectSessionsDetail = (id, params) => {
    return getRequest(`/base/examseason/get/${id}`, params)
}
//新增/编辑考试安排
export const sessionsEdit = (params) => {
    return postRequest(`/base/examseason/sessionsEdit`, params)
}
//更新考试安排状态
export const setSessionsStatus = (params) => {
    return postRequest(`/base/examseason/setSessionsStatus`, params)
}


//查询考试场次时间列表
export const selectTimeList = (params) => {
    return postRequest(`/base/exatime/list`, params)
}
//新增/编辑考试场次时间
export const timeEdit = (params) => {
    return postRequest(`/base/exatime/timeEdit`, params)
}
//根据id删除
export const delTimeItem = (id) => {
    return getRequest(`/base/exatime/delByTagId/${id}`)
}


//查询考试条件列表
export const selectApplyList = (params) => {
    return postRequest(`/base/examItem/list`, params)
}
//根据id删除
export const delItem = (id) => {
    return getRequest(`/base/examItem/delByTagId/${id}`)
}
//添加考试条件
export const addItem = (params) => {
    return postRequest('/base/examItem/addExamItem', params)
}
//查询考试条件项
export const selectItem = (params) => {
    return postRequest('/base/examItem/selectItem', params)
}
//根据id删除
export const resetApplyItem = (examinationId) => {
    return getRequest(`/base/examItem/resetApplyItem/${examinationId}`)
}


//活动列表
export const activityrecordList = (params) => {
    return postRequest('/base/activityrecord/list', params)
}
//活动编辑
export const activityrecordSetStatus = (params) => {
    return postRequest('/base/activityrecord/setStatus', params)
}
//活动详情
export const getActivityrecord = (id, params) => {
    return getRequest(`/base/activityrecord/get/${id}`, params)
}
//颁发证书
export const awardCertificate = (params) => {
    return postRequest('/base/usercertificate/awardCertificate', params)
}
//用户证书列表
export const userCertificateList = (params) => {
    return postRequest('/base/usercertificate/userCertificateList', params)
}


/*线下课程模块--benin*/

//列表
export const offCourseList = (params) => {
    return postRequest('/base/offcourse/list', params)
}
//添加
export const addOffCourse = (params) => {
    return postRequest('/base/offcourse/add', params)
}
//根据ID查询
export const getOffCourse = (id, params) => {
    return getRequest(`/base/offcourse/get/${id}`, params)
}
//修改
export const editOffCourse = (params) => {
    return postRequest('/base/offcourse/edit', params)
}
//删除
export const delOffCourse = (ids) => {
    return postRequest('/base/offcourse/delById', {
        ids: ids
    })
}
//更新上架状态
export const setOffCourseStatus = (params) => {
    return postRequest('/base/offcourse/setOffCourseStatus', params)
}
//更新上架状态
export const setOffCourseIndex = (params) => {
    return postRequest('/base/offcourse/setOffCourseIndex', params)
}
//更新报名状态
export const setApplyType = (params) => {
    return postRequest('/base/offcourse/setApplyType', params)
}
/*线下课程模块--end*/


/*题库管理--benin*/

// tree数据
export const selectExamType = (params) => {
    return postRequest('/base/examtype/tree', params)
}
// 删除
export const delExam = (ids) => {
    return postRequest('/base/exam/delByIds', {
        ids: ids
    })
}
//根据ID查询
export const getExam = (id, params) => {
    return getRequest(`/base/exam/get/${id}`, params)
}
//列表
export const examList = (params) => {
    return postRequest('/base/exam/list', params)
}
//添加
export const addExam = (params) => {
    return postRequest('/base/exam/add', params)
}
//修改
export const updateExam = (params) => {
    return postRequest('/base/exam/update', params)
}

//选项列表
export const examOptList = (params) => {
    return postRequest('/base/examOpt/list', params)
}
//删除题目答案
export const delExamOpt = (id) => {
    return getRequest(`/base/examOpt/delById/${id}`)
}
//添加题目答案
export const addAnswer = (params) => {
    return postRequest('/base/examOpt/add', params)
}
//添加题目答案
export const editAnswer = (params) => {
    return postRequest('/base/examOpt/edit', params)
}
/*题库管理--end*/


// 获取测评信息
export const getAbiltity = (id) => {
    return getRequest(`/base/abiltity/get/${id}`)
}
//修改
export const updateAbiltity = (params) => {
    return postRequest('/base/abiltity/update', params)
}


// 修改
export const editStudent = (params) => {
    return postRequest('/base/student/edit', params)
}
// 删除
export const delStudent = (ids) => {
    return postRequest("/base/student/delByIds", {
        ids: ids
    })
}

// 列表
export const studentList = (params) => {
    return postRequest('/base/student/list', params)
}

// 列表
export const studentList2 = (params) => {
    return postRequest('/base/student/list2', params)
}

// 获取单个对象
export const getStudent = (id) => {
    return postRequest(`/base/student/get/${id}`)
}
// 更新状态
export const setStatus = (params) => {
    return postRequest('/base/student/setStatus', params)
}


//订单列表
export const orderList = (params) => {
    return postRequest('/base/order/list', params)
}
//发票信息
export const invoiceList = (id) => {
    return postRequest(`/base/invoice/invoiceList/${id}`)
}
//更新发票信息
export const editInvoice = (params) => {
    return postRequest('/base/invoice/update', params)
}

//订单退款
export const returnAmount = (params) => {
    return postRequest('/base/order/returnOrder', params);
}

/**  企业管理  **/

//员工管理
export const staffList = (params) => {
    return postRequest('/base/staff/list', params)
}
//员工信息
export const staffDetail = (id) => {
    return getRequest(`/base/staff/staffDetail/${id}`)
}
//认证工作经历
export const checkUserWork = (id) => {
    return getRequest(`/base/workcourse/checkUserWork/${id}`)
}
//认证教育经历
export const checkUserEdu = (id) => {
    return getRequest(`/base/education/checkUserEdu/${id}`)
}
//员工项目分
export const staffScore = (id) => {
    return getRequest(`/base/staff/staffScore/${id}`)
}
//添加企业员工
export const addStaff = (params) => {
    return postRequest('/base/staff/addStaff', params)
}
//添加企业员工
export const editStaff = (params) => {
    return postRequest('/base/staff/editStaff', params)
}
//获取企业部门
export const getDepartment = (parentId) => {
    return getRequest(`/base/staff/getDepartment/${parentId}`)
}
//员工信息
export const staffInfo = (id) => {
    return getRequest(`/base/staff/staffInfo/${id}`)
}
//学员证书
export const getUserCertificate = (params) => {
    return postRequest('/base/usercertificate/list', params)
}
// 学员证书-删除
export const delUserCertificate = (id) => {
    return postRequest(`/base/usercertificate/delById/${id}`)
}
//修改用户证书
export const editUserCertificate = (params) => {
    return postRequest('/base/usercertificate/edit', params)
}

//证书转换审核列表
export const getScorecheck = (params) => {
    return postRequest('/base/scorecheck/list', params)
}
//证书转换审核
export const setScorecheck = (params) => {
    return postRequest('/base/scorecheck/edit', params)
}

//国开学籍表
export const gkregisterList = (params) => {
    return postRequest('/base/gkregister/list', params)
}
//国开学籍表
export const gkregisterSetStatus = (params) => {
    return postRequest('/base/gkregister/setStatus', params)
}


//国开学籍表
export const userGkregisterList = (params) => {
    return postRequest('/base/gkregister/userList', params)
}
//更改国开学籍状态
export const userGkregisterSetStatus = (params) => {
    return postRequest('/base/gkregister/userSetStatus', params)
}

//用户考试记录列表
export const userExaminationList = (params) => {
    return postRequest('/base/userexamination/list', params)
}
//用户考试时间列表
export const userExaTimeList = (exatimeId) => {
    return postRequest(`/base/userexamination/exaTimeList/${exatimeId}`)
}
//用户考试时间列表
export const getOssSeting = () => {
    return postRequest('/base/dictdata/getOssSeting')
}


//证书报考条件项列表
export const conditionitemList = (params) => {
    return postRequest('/base/conditionitem/list', params)
}
//平台证书列表
export const selectCertificateList = () => {
    return postRequest('/base/certificate/selectList')
}
//证书报考条件项列表
export const saveOrEdit = (params) => {
    return postRequest('/base/conditionitem/conditionitemEdit', params)
}
//报考条件表
export const selectEnumItem = (params) => {
    return postRequest('/base/exaenum/getEnumItem', params)
}


//分享收益列表
export const shareList = (params) => {
    return postRequest('/base/sharelog/list', params)
}


//首页模块列表
export const indextagList = (params) => {
    return postRequest('/base/indextag/list', params)
}
//首页模块新增/修改
export const indexAddOrEdit = (params) => {
    return postRequest('/base/indextag/addOrEdit', params)
}
//根据id删除
export const delByTagId = (id) => {
    return getRequest(`/base/indextag/delByTagId/${id}`)
}


//批量删除员工
export const delStaff = (ids) => {
    return postRequest("/base/staff/delByIds", {ids: ids})
}
//hr打分
export const hrGrade = (params) => {
    return postRequest("/base/staff/hrGrade", params)
}
//添加企业黑名单
export const addBlacklist = (id) => {
    return getRequest(`/base/staff/addBlacklist/${id}`)
}
//企业排名
export const companyRank = (params) => {
    return postRequest("/base/staff/companyRank", params)
}
//学习计划列表
export const planList = (params) => {
    return postRequest('/base/plan/list', params)
}
//删除学习计划
export const removePlan = (id) => {
    return getRequest(`/base/plan/removePlan/${id}`)
}
//企业部门列表
export const deptList = (params) => {
    return postRequest('/base/plan/deptList', params)
}
//添加学习计划
export const addPlan = (params) => {
    return postRequest('/base/plan/add', params)
}
//添加学习计划
export const editPlan = (params) => {
    return postRequest('/base/plan/edit', params)
}
//修改查询学习计划信息
export const complanInfo = (id) => {
    return getRequest(`/base/plan/complanInfo/${id}`)
}
//计划内员工
export const getStaffData = (params) => {
    return postRequest('/base/plan/getStaffData', params)
}
//计划内课程
export const getCourseData = (params) => {
    return postRequest('/base/plan/getCourseData', params)
}
//计划内课程
export const getDeptData = (params) => {
    return postRequest('/base/plan/getDeptData', params)
}
//版本列表
export const versionsList = (params) => {
    return postRequest('/base/versions/versionsList', params)
}
//版本更新
export const updateVersion = (params) => {
    return postRequest('/base/versions/updateVersion', params)
}
//更新版本强制更新状态
export const setForceUpdate = (params) => {
    return postRequest('/base/versions/setForceUpdate', params)
}
//修改查询学习计划信息
export const getVersion = (id) => {
    return getRequest(`/base/versions/getVersion/${id}`)
}
//赠送积分
export const addScore = (params) => {
    return postRequest('/base/student/addScore', params)
}
//赠送学习币
export const addIntegral = (params) => {
    return postRequest('/base/student/addIntegral', params)
}
//用户积分记录
export const scoreList = (params) => {
    return postRequest('/base/student/scoreList', params)
}
//用户学习币充值记录
export const amountList = (params) => {
    return postRequest('/base/student/amountList', params)
}
//添加个人vip
export const addVip = (params) => {
    return postRequest('/base/student/addUserVip', params)
}
//学分转换列表
export const creditbankList = (params) => {
    return postRequest('/base/creditbank/list', params)
}
//学分转换列表
export const opinion = (params) => {
    return postRequest('/base/creditbank/opinion', params)
}

// 操作日志列表
export const operationlogList = (params) => {
    return postRequest('/base/operationlog/list', params)
}
//导入题库
export const importExam = (params) => {
    return postRequest('/base/common/importExam', params)
}

//证书转换证明申请列表
export const changeList = (params) => {
    return postRequest('/base/changecertificate/changeList', params)
}
//更改证书转换证明状态
export const changeSetStatus = (params) => {
    return postRequest('/base/changecertificate/changeSetStatus', params)
}

//行业
//添加行业
export const addIndustry = (params) => {
    return postRequest('/base/exaenum/addIndustry', params)
}
//查询行业
export const getAllTypeList = (params) => {
    return postRequest('/base/exaenum/getEnumTree', params)
}
//删除行业
export const deleteIndustry = (id) => {
    return getRequest(`/base/exaenum/delById/${id}`)
}
//查询考试类型
export const getExamTypeTree = (params) => {
    return postRequest('/base/sysExamType/selectTreeData2', params)
}
//新增考试类型
export const editExamType = (params) => {
    return postRequest('/base/sysExamType/edit', params)
}
//删除考试类型
export const delExamTypeById = (id) => {
    return getRequest(`/base/sysExamType/delById2/${id}`)
}
// 教育经历列表
export const studentEduList = (params) => {
    return postRequest('/base/sysUserEduation/list', params)
}
// 工作经历列表
export const studentWorkList = (params) => {
    return postRequest('/base/sysUserWork/list', params)
}
// 培训经历列表
export const studentTrainList = (params) => {
    return postRequest('/base/sysUserTrain/list', params)
}